import request from "../utils/request.js";
// 创建订单

export function creatOrder(data) {
  return request({
    url: "/order",
    method: "post",
    data,
  });
}
// 支付

export function payApp(data) {
  return request({
    url: "/pay/app",
    method: "post",
    data,
  });
}
// 支付上传凭证审核

export function payCheck(data) {
  return request({
    url: "/payCheck/check",
    method: "post",
    data,
  });
}
// 我的订单统计

export function myOrderCount(data) {
  return request({
    url: `/order/myOrderCount`,
    method: "get",
    data,
  });
}
// 我的订单

export function myOrderList(data) {
  return request({
    url: `/order/myOrderList`,
    method: "get",
    data,
  });
}
//app端订单详情

export function appOrderDetail(id) {
  return request({
    url: `/order/appOrderDetail/${id}`,
    method: "get",
  });
}

// 订单取消

export function orderCancel(data) {
  return request({
    url: `/order/cancel`,
    method: "post",
    data,
  });
}
// 订单签约

export function orderSign(data) {
  return request({
    url: `/order/sign`,
    method: "post",
    data,
  });
}
// 订单删除

export function orderDelete(id) {
  return request({
    url: `/order/${id}`,
    method: "delete",
  });
}
// app申请开票
export function invoiceApply(data) {
  return request({
    url: `/invoiceApply`,
    method: "post",
    data,
  });
}
// 申请退款
export function refundApply(data) {
  return request({
    url: `/refund`,
    method: "post",
    data,
  });
}
// 生成合同
export function exportContract(data) {
  return request({
    url: `/contract/export/contract`,
    method: "post",
    data,
  });
}
